package com.javasea.spring.proxy;

import com.javasea.spring.proxy.service.Search;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * @author laihaohua
 */
public class JdkSpiMain {

    public static void main(String[] args) {
        ServiceLoader<Search> s = ServiceLoader.load(Search.class);
        Iterator<Search> searchList = s.iterator();
        while (searchList.hasNext()){
            Search search = searchList.next();
            search.search("test");
        }
    }

}
